package cn.gudian.cms.News

import cn.gudian.cms.Stat.Stat
/**
 * 文档
 */
class Article {

  static belongsTo = [arcType: ArcType];//栏目
  double orderNum;//排序���
  boolean ismake;//审核
  String title;//标题����
  String shorttitle;//简短标题������
  String writer;//作者
  String thumbnails;//缩略图���ͼ
  Date pubdate//发布时间
  Date adddate//添加时间�
  String keywords;//关键词
  String url;
  boolean ispost;//是否允许评论
  String userip;//IP
  String description;//描述
  String body;//内容����
  static mapping = {
     sort id:"desc"
    keywords type: 'text'
    description type: 'text'
    body type: 'text'
    arcType index:'ArcTypeAndIsMake_Idx'
    ismake index:'IsMake_Idx,ArcTypeAndIsMake_Idx'
  }
  static constraints = {
    arcType()
    title(blank: false, maxlength: 500);
    shorttitle(maxlength: 500);
    writer(maxlength: 200);
    orderNum();
    ismake();
    thumbnails(maxlength: 200);
    pubdate()
    adddate()
    keywords(maxlength: 500);
    url(url:true);
    ispost();
    userip(maxlength: 100);
    description();
    body()
  }
}

